package com.example.demo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
public class HelloWordController {
    @RequestMapping("/hello")
    public String hello(){
        String name = "wangchuang1";
        Integer age = 19;
        String total = "{\"name\":\"wangchaung\",\"age\": 18}";
        System.out.println(total);
        return "Hello,Spring Boot";
    }

    @Autowired
    private GetPersonInfoProperties getPersonInfoProperties;
    @RequestMapping("/innername")
    public String name() {
        return getPersonInfoProperties.getName();
    }
    @RequestMapping("allinnfo")
    public String  allinnfo() {
        return getPersonInfoProperties.getAge() + " " + getPersonInfoProperties.getName() + " " + getPersonInfoProperties.getInfo();
    }


}


